<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
  <title>函数参数默认值</title>
  <script src="../js/axios.js"></script>
  <script>
    function fn(...rest) {
		let sum = 0
		for (let i = 0; i<rest.length; i++){
			sum +=rest[i]
		}
		console.log(sum)
	}
	
	let arr=[1,2,3,4,5]
	fn(...arr)
	console.log(fn.name,fn.length)
  </script>
</head>
<body>
<div id="app"><!-- todo --></div>
</body>
</html>
